package com.sms.smscode.room;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import java.util.List;

@Dao
public interface SmsDao {


    @Insert
    void insetData(SmsEntity smsEntity);

    @Query("select * from SmsEntity where 1=1 order by id asc")
    List<SmsEntity> queryData();


    @Query("select * from SmsEntity where sms_id=:smsId order by id asc")
    List<SmsEntity> queryDataById(String smsId);


//    @Insert
//    void insertAll(RoomEntity...roomEntitys);
//    @Insert
//    void insertAll(List<RoomEntity> roomEntitys);
//    @Delete
//    int delete(RoomEntity roomEntity);//参数可以是数组，集合，返回的是删除的条数
//
//    @Update
//    int update(RoomEntity...roomEntitys);//返回的是update的条数
//
//    @Query("select * from RoomEntity")
//    List<RoomEntity> getAllFromSync();
//
//    @Query("select * from RoomEntity")
//    LiveData<List<RoomEntity>> getAllFromSyncLiveData();
}
